import { createSSRApp } from "vue";
import App from "./App.vue";
import { setupStore } from "./store";
import "uno.css";
import { createI18n } from "vue-i18n"; //引入vue-i18n组件
import zh from "./locales/zh-CN";
import en from "./locales/en";
import pluszhCn from "element-plus/es/locale/lang/zh-cn";
import plusen from "element-plus/es/locale/lang/en";
import "@dcloudio/uni-webview-js";
// 实例化I18n
const i18n = createI18n({
  locale: "zh", // 初始化配置语言
  messages: {
    zh: {
      ...zh,
      ...pluszhCn,
    },
    en: {
      ...en,
      ...plusen,
    },
  },
});
export default i18n;
export function createApp() {
  const app = createSSRApp(App);
  app.use(i18n);
  setupStore(app);

  return {
    app,
  };
}
